import {baseUrl} from '@/config/env';
import iconList from "@/config/systemIcons";

export default () => {
    return {
        index: true,
        submitText: '修改',
        size: 'small',
        labelWidth: 120,
        menuType: 'menu',
        menuAlign: 'center',
        menuPosition: "right",
        column: [
            {
                label: 'id',
                span: 12,
                prop: 'id',
                align:"left",
                editDisplay: false,
                addDisplay: false
            },
            {
                label: '模型名称',
                prop: 'name',
                span: 12,
                rules: [{
                    required: true,
                    trigger: "blur"
                }]
            },
            {
                label: '模型标识',
                span: 12,
                prop: 'key',
                editDisplay: false,
                rules: [{
                    required: true,
                    trigger: "blur"
                }]
            },
            {
                label: '流程类别',
                prop: 'category',
                span: 12,
                type:'select',
                dicUrl: baseUrl + "/start/sysDictionaryItem/listByDictionaryCode",
                dicMethod: "get",
                dicQuery: {code: "activiti_group"},
                props: {
                    label: 'name',
                    value: 'code',
                },
                rules: [{
                    required: true,
                    trigger: "blur"
                }]
            },
            {
                label: '图标',
                row: true,
                accept:"image/*",
                prop: 'modelIcon',
                type:"upload",
                limit:1,
                listType:'picture-card',
                action: `${baseUrl}/staticResources/upload`,
                propsHttp: {
                    name: 'fileName',
                    res: 'data',
                    url: 'fileUrl',
                },
                rules: [{
                    required: false,
                    trigger: "blur"
                }]
            },
            {
                label: '版本',
                prop: 'revision',
                span: 12,
                editDisplay: false,
                addDisplay: false
            }, {
                label: '最后修改时间',
                prop: 'lastUpdateTime',
                span: 12,
                type: 'datetime',
                valueFormat: 'yyyy-MM-dd HH:mm:ss',
                format: 'yyyy-MM-dd HH:mm:ss',
                editDisplay: false,
                addDisplay: false
            },
        ]
    }
}
